exports.validateId = (id) => {
  if (!Number.isInteger(parseInt(id))) {
    throw new Error("ID must be an integer");
  }
};

exports.validatePost = (post) => {
  if (typeof post.title !== "string") {
    throw new Error("Title must be a string");
  }
  // 进行更多的验证...
};
